import { getRequest, postRequest, putRequest, deleteRequest } from '@/libs/axios'

/**
 * 获取康复建议列表
 * @param {string} medicalRecordId - 病历ID
 * @returns {Promise} 返回康复建议列表
 */
export const getRecoveryAdviceList = (medicalRecordId) => {
  return getRequest(`/recovery-advice/list/${medicalRecordId}`);
}

/**
 * 保存康复建议
 * @param {Object} advice - 康复建议对象
 * @returns {Promise} 返回保存结果
 */
export function saveRecoveryAdvice(advice) {
  return postRequest('/recovery-advice/save', advice);
}

/**
 * 更新康复建议
 * @param {Object} advice - 康复建议对象
 * @returns {Promise} 返回更新结果
 */
export function updateRecoveryAdvice(advice) {
  return putRequest('/recovery-advice/update', advice);
}

/**
 * 删除康复建议
 * @param {string} id - 康复建议ID
 * @returns {Promise} 返回删除结果
 */
export function deleteRecoveryAdvice(id) {
  return deleteRequest(`/recovery-advice/delete/${id}`);
} 